Integrand size = 33, antiderivative size = 256 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=-\frac {2 a \left (3 A b^2+8 a^2 C-5 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (3 A b^2+\left (8 a^2+b^2\right ) C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}+\frac {2 a \left (A b^2+a^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d} \]
[Out]
Time = 0.50 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3111, 3102, 2831, 2742, 2740, 2734, 2732} \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {2 a \left (a^2 C+A b^2\right ) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (C \left (8 a^2+b^2\right )+3 A b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}-\frac {2 a \left (8 a^2 C+3 A b^2-5 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 C \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 b^2 d} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 3102
Rule 3111
Rubi steps \begin{align*} \text {integral}& = \frac {2 a \left (A b^2+a^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \int \frac {\frac {1}{2} b \left (A b^2+a^2 C\right )+\frac {1}{2} a \left (A b^2+2 a^2 C-b^2 C\right ) \cos (c+d x)-\frac {1}{2} b \left (a^2-b^2\right ) C \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{b^2 \left (a^2-b^2\right )} \\ & = \frac {2 a \left (A b^2+a^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}-\frac {4 \int \frac {\frac {1}{4} b^2 \left (3 A b^2+\left (2 a^2+b^2\right ) C\right )+\frac {1}{4} a b \left (3 A b^2+8 a^2 C-5 b^2 C\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^3 \left (a^2-b^2\right )} \\ & = \frac {2 a \left (A b^2+a^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}-\frac {\left (a \left (3 A b^2+8 a^2 C-5 b^2 C\right )\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{3 b^3 \left (a^2-b^2\right )}+\frac {\left (3 A b^2+8 a^2 C+b^2 C\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^3} \\ & = \frac {2 a \left (A b^2+a^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}-\frac {\left (a \left (3 A b^2+8 a^2 C-5 b^2 C\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{3 b^3 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (3 A b^2+8 a^2 C+b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{3 b^3 \sqrt {a+b \cos (c+d x)}} \\ & = -\frac {2 a \left (3 A b^2+8 a^2 C-5 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (3 A b^2+\left (8 a^2+b^2\right ) C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}+\frac {2 a \left (A b^2+a^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d} \\ \end{align*}
Time = 2.15 (sec) , antiderivative size = 209, normalized size of antiderivative = 0.82 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=-\frac {2 \left (a (a+b) \left (3 A b^2+8 a^2 C-5 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-\left (a^2-b^2\right ) \left (3 A b^2+\left (8 a^2+b^2\right ) C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )+b \left (-4 a^3 C+a b^2 (-3 A+C)+b \left (-a^2+b^2\right ) C \cos (c+d x)\right ) \sin (c+d x)\right )}{3 (a-b) b^3 (a+b) d \sqrt {a+b \cos (c+d x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(888\) vs. \(2(296)=592\).
Time = 16.50 (sec) , antiderivative size = 889, normalized size of antiderivative = 3.47
method | result | size |
default | \(\text {Expression too large to display}\) | \(889\) |
parts | \(\text {Expression too large to display}\) | \(1118\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.16 (sec) , antiderivative size = 723, normalized size of antiderivative = 2.82 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {6 \, {\left (4 \, C a^{3} b^{2} + {\left (3 \, A - C\right )} a b^{4} + {\left (C a^{2} b^{3} - C b^{5}\right )} \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sin \left (d x + c\right ) - {\left (\sqrt {2} {\left (16 i \, C a^{4} b + 2 i \, {\left (3 \, A - 8 \, C\right )} a^{2} b^{3} - 3 i \, {\left (3 \, A + C\right )} b^{5}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (16 i \, C a^{5} + 2 i \, {\left (3 \, A - 8 \, C\right )} a^{3} b^{2} - 3 i \, {\left (3 \, A + C\right )} a b^{4}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) - {\left (\sqrt {2} {\left (-16 i \, C a^{4} b - 2 i \, {\left (3 \, A - 8 \, C\right )} a^{2} b^{3} + 3 i \, {\left (3 \, A + C\right )} b^{5}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-16 i \, C a^{5} - 2 i \, {\left (3 \, A - 8 \, C\right )} a^{3} b^{2} + 3 i \, {\left (3 \, A + C\right )} a b^{4}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) + 3 \, {\left (\sqrt {2} {\left (-8 i \, C a^{3} b^{2} - i \, {\left (3 \, A - 5 \, C\right )} a b^{4}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-8 i \, C a^{4} b - i \, {\left (3 \, A - 5 \, C\right )} a^{2} b^{3}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) + 3 \, {\left (\sqrt {2} {\left (8 i \, C a^{3} b^{2} + i \, {\left (3 \, A - 5 \, C\right )} a b^{4}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (8 i \, C a^{4} b + i \, {\left (3 \, A - 5 \, C\right )} a^{2} b^{3}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right )}{9 \, {\left ({\left (a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{3} b^{4} - a b^{6}\right )} d\right )}} \]
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int \frac {\cos \left (c+d\,x\right )\,\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
[In]
[Out]